package dao.position;

import java.util.List;

import vo.PositionVO;

import com.ibatis.sqlmap.client.SqlMapClient;

public class PositionDAOImpl implements PositionDAO{
	
	private SqlMapClient sqlMapClient;
	
	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}

	@Override
	public List<PositionVO> getPositionList() throws Exception {
		return sqlMapClient.queryForList("position.getPositionList");
	}

	@Override
	public void registerPosition(String position_name) throws Exception {
		sqlMapClient.insert("position.registerPosition", position_name);
	}

	@Override
	public void updatePosition(PositionVO param) throws Exception {
		sqlMapClient.update("position.updatePosition", param);
	}

	@Override
	public void deletePosition(int position_no) throws Exception {
		sqlMapClient.update("position.deletePosition", position_no);
	}
}
